package com.ostrich.library_base

import androidx.databinding.ViewDataBinding
import androidx.lifecycle.ViewModelProvider

/**
 * @Author : yaotianxue
 * @Time : On 2023/10/24 10:28
 * @Description : BaseMvvmFragment
 */
abstract class BaseMvvmFragment<VDB:ViewDataBinding,VM:BaseViewModel>:BaseFragment<VDB>() {
    //惰性初始化：什么时候使用什么初始化
    //延迟初始化：稍后初始化
    val viewModel:VM by lazy{
        ViewModelProvider(this).get(getJVMClass())
    }

    abstract fun getJVMClass():Class<VM>

}